<style tyle="text/css">
    .modal-lg {
      width: 70%;
    }
  </style>
  <div class="modal-header">
    <h4 class="modal-title">创建区域</h4>
  </div>
  <div class="modal-body">
  
    <form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">
      <div class="form-group">
        <label class="col-lg-3 control-label">区域名称:</label>
        <div class="col-lg-6">
          <input type="text" class="form-control" ng-model="rulesinfo.area_name" ng-if="!rulesinfo.openstate" placeholder="区域名称">
        </div>
        <div class="col-lg-6" >
          <input type="text" class="form-control" ng-model="rulesinfo.area_name" ng-if="rulesinfo.openstate" readonly>
        </div>
    </div>
        <div class="form-group">
            <label for="inputDate" class="col-sm-3 control-label">区域层级</label>
            <div class="col-md-6" ng-if="!rulesinfo.openstate" >
                <select class="form-control" ng-model="rulesinfo.path" ng-change="changepath(rulesinfo.path)">
                    <option value="">请选择</option>
                    <option ng-value="1">创城办</option>
                    <option ng-value="2">街道</option>
                    <option ng-value="3">社区</option>
                </select>
            </div>
            
         </div>

         <div class="form-group" ng-if="openpath == '3' || openpath == '2'">
                <label for="inputDate" class="col-sm-3 control-label">所属创城办</label>
                <div class="col-md-6" ng-if="!rulesinfo.openstate" >
                    <select class="form-control" ng-model="rulesinfo.up_area_code1" ng-change="changepath1(rulesinfo.up_area_code1)" >
                        <option value="">请选择</option>
                        <option ng-value="info.area_code" ng-repeat="info in arealist1">{{info.area_name}}</option>
                    </select>
                </div>
                <div class="col-lg-6" >
                    <input type="text" class="form-control" ng-model="rulesinfo.type_name" ng-if="rulesinfo.openstate" readonly>
                </div>
             </div>

             <div class="form-group"  ng-if="openpath == 3">
                    <label for="inputDate" class="col-sm-3 control-label">所属街道</label>
                    <div class="col-md-6" ng-if="!rulesinfo.openstate" >
                        <select class="form-control" ng-model="rulesinfo.up_area_code2" ng-change="changepath2(rulesinfo.up_area_code2)">
                            <option value="">请选择</option>
                            <option ng-value="info.area_code" ng-repeat="info in arealist2">{{info.area_name}}</option>
                        </select>
                    </div>
                    <div class="col-lg-6" >
                        <input type="text" class="form-control" ng-model="rulesinfo.type_name" ng-if="rulesinfo.openstate" readonly>
                    </div>
                 </div>

    </form>
  
  </div>
  
  <div class="modal-footer">
      <button class="btn btn-success" type="button" ng-if="!rulesinfo.openstate" ng-click="save()">确定</button>
      <button class="btn btn-danger" type="button" ng-click="cancel()">取消</button>
  </div>
  